<?php $this->_extends('../_layouts/frame_layout'); ?>

<?php $this->_block('inits'); ?>
<script type="text/javascript" src="<?php echo $_BASE_DIR; ?>js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR; ?>js/ajaxupload.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR; ?>js/jquery.form.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR; ?>js/jquery.datepick.min.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR; ?>js/jquery.covertape-0.3.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>
<script type="text/javascript" src="<?php echo $_BASE_DIR; ?>scripts/mocha-init_3.js"></script>
<script type="text/javascript">

initializeColumns = function() {

	new MUI.Column({
		id: 'sideColumn1',
		placement: 'left',
		width: 200,
		resizeLimit: [100, 300]
	});
	
	new MUI.Column({
		id: 'mainColumn',
		placement: 'main',
		resizeLimit: [100, 300]
	});
	
	// Add panels to first side column
	new MUI.Panel({
		id: 'files-panel',
		title: '欢迎页面',		
		contentURL: 'index.php?action=userwelcome',
		column: 'sideColumn1',
		collapsible: false,
		onContentLoaded: function(){
			jQuery("#xia").datecontrol({format:"yyyy-mm-dd"});

			jQuery('#Form_OpSearch').ajaxForm({
					target: '#mainPanel_pad',
					success: function(a) {
						
						//jQuery('#tip').html('2009');
					}
			});
		}	
	});
	
	new MUI.Panel({
		id: 'mainPanel',
		title: '用户信息',
		contentURL: 'index.php?namespace=admin&controller=users&action=view&user_id=<?php echo $userid; ?>',
		column: 'mainColumn',
		headerToolbox: false,
		collapsible: false
	});
	
	MUI.myChain.callChain();
	
}

// Initialize MochaUI when the DOM is ready
window.addEvent('load', function(){ //using load instead of domready for IE8

	MUI.myChain = new Chain();
	MUI.myChain.chain(
		function(){MUI.Desktop.initialize();},
		function(){MUI.Dock.initialize();},
		function(){initializeColumns();},		
		function(){initializeWindows();}		
	).callChain();	

});

</script>
<?php $this->_endblock(); ?>

<?php $this->_block('contents'); ?>

<?php $this->_endblock('contents'); ?>